#include "feiwu.h"

#include <QApplication>
#include <QSharedMemory>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);


    //只能打开一个实例
    QSharedMemory shared_memory;
    shared_memory.setKey(QString("YunLog"));//设置固定共享内存段的key值
    if(shared_memory.attach())   //尝试将进程附加到该共享内存段
    {
        return 0;
    }

    if(shared_memory.create(1)) //创建1byte的共享内存段
    {
        FeiWu w;
        w.show();
        return a.exec();
    }
     return 0;
}
